package com.example.demo.controller;

import com.example.demo.dto.RegisterDto;
import com.example.demo.service.UserService;
import com.example.demo.model.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/register")
@RestController
@AllArgsConstructor
public class UserRegisterController {

    private UserService userService;

    @PostMapping
    public Result Register(@RequestBody RegisterDto registerDto) {
        return userService.register(registerDto);
    }
}
